#pragma once
#ifndef CLIENT_H
#define CLIENT_H
#include "Date.h"
#include <iostream>
#include "CallerMachine.h"

enum class BussinessType { COMMON, SPECIAL };
enum class Sex { MAN, WOMAN };

class Client
{
public:
    Client();
    Client(CallerMachine&,int min = 0);
    Client(CallerMachine&,string, Sex, BussinessType, int, int);
    virtual ~Client();
    int getReachTime();
    int getComsumptionTime();
    int getWaitingTime();
    int getOverTime();
    int getWidgetNo();
    string getNo();
    Date& getReachDate();
    Date& getOverDate();
    string getName();
    Sex getSex();
    BussinessType getBussinessType();
    void setNo(string No);
    void setReachTime(int minutes);
    void setWaitingTime(int minutes);
    void setWidgetNo(int num);
    void update();                      //刷新
    bool operator >=(const Client& other)const;
    bool operator <=(const Client& other)const;
    string toString();

protected:

private:
    BussinessType bussinessType;    //业务类型
    string No;                      //编号
    int reachTime;                  //到达时间(int)
    int comsumptionTime;            //消耗时间(int)
    int waitingTime;                //等待时间(int)
    int overTime;                   //结束时间(int)
    Date reachDate;                 //到达时间
    Date overDate;                  //结束时间
    string name;                    //姓名
    Sex sex;                        //性别
    int widgetNo;                   //窗口号
};

#endif // CLIENT_H